# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""

#(1)
sum = 0
for i in range(1,101):
    if i % 2 == 0:
     sum = sum + i
print('所以1-100内所有奇数之和为：',sum)
    
#(2)
sum = 0
for i in range(1,101,2):
     sum = sum + i
print('所以1-100内所有奇数之和为: ',sum)

        